var ground = 
{
	x:769,
	y:515,
	whole_x:769,
	whole_y:515,
	x_groundmove:200,//设置触发x边界(左右边界)移动的初始值
	y_groundmove:70,//设置触发y边界(上下边界)移动的初始值

	draw:function()
	{
		
		var img = document.getElementById("background");
		var img1 = document.getElementById("background1");
		var img2 = document.getElementById("background2");
		var img3 = document.getElementById("background3");
		var img4 = document.getElementById("background4");
		var img5 = document.getElementById("background5");
		/*
		if (player.birth_x<this.x_groundmove)
		{
			g.drawImage(img,(this.whole_x-this.x)/2-this.x_groundmove+player.birth_x, (this.whole_y-this.y)/2, this.x, this.y,0,0,this.x, this.y) ;
		}
		else if((player.birth_x+player.length_y)>(this.x-this.x_groundmove)){
			if((((this.whole_x-this.x)/2+(player.birth_x+player.length_y)-(this.x-this.x_groundmove))+ this.x)>this.whole_x){
				g.drawImage(img,(this.whole_x-this.x), (this.whole_y-this.y)/2,  this.x,  this.y,0,0, this.x, this.y) ;
			}
			else{
				g.drawImage(img,(this.whole_x-this.x)/2+(player.birth_x+player.length_y)-(this.x-this.x_groundmove), (this.whole_y-this.y)/2, this.x,  this.y,0,0,this.x, this.y) ;
			}
		}
		else if(player.birth_y<this.y_groundmove){
			if(((this.whole_y-this.y)/2-this.y_groundmove+player.birth_y)<0){
				g.drawImage(img,(this.whole_x-this.x)/2, 0, this.x,  this.y,0,0,this.x, this.y) ;
			}
			else {
				g.drawImage(img,(this.whole_x-this.x)/2, (this.whole_y-this.y)/2-this.y_groundmove+player.birth_y, this.x,  this.y,0,0,this.x, this.y) ;
			}
		}
		else if((player.birth_y+player.length_y)>(this.y-this.y_groundmove)){
			if((((this.whole_y-this.y)/2+(player.birth_y+player.length_y)-(this.y-this.y_groundmove))+ this.y)>this.whole_y){
				g.drawImage(img,(this.whole_x-this.x)/2, (this.whole_y-this.y), this.x,  this.y,0,0,this.x, this.y) ;
			}
			else{
				g.drawImage(img,(this.whole_x-this.x)/2, (this.whole_y-this.y)/2+(player.birth_y+player.length_y)-(this.y-this.y_groundmove), this.x,  this.y,0,0,this.x, this.y) ;
			}
		}
		else{*/
			g.drawImage(img,(this.whole_x-this.x)/2, (this.whole_y-this.y)/2, this.x,  this.y,0,0,this.x, this.y) ;
		//}

	}
}



